#include<iostream>
#include<map>
#include<string>
using namespace std;
typedef unsigned long long ULL;
const int P = 131, N = 1510;
ULL p[N], s[N];
map<ULL, int>mp;
int n;
int main()
{
	cin >> n;
	int ans = 0;
	while (n--) {
		string str;
		cin >> str;
		p[0] = 1;
		s[0] = 0;
		for (int i = 1; i <= str.size(); i++) {
			p[i] = p[i - 1] * P;
			s[i] = s[i - 1] * P + str[i] - '0';
		}
		ULL sum = s[str.size()] * p[str.size()];
		//cout << "sum==" << sum << endl;
		if (mp[sum]) {
			continue;
		}
		else {
			mp[sum] = 1;
			ans++;
		}
	}
	cout << ans << endl;
	return 0;
}